package org.baeta;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.baeta.client.WeatherObservationClient;
import org.baeta.client.WeatherObservationJSONClient;
import org.baeta.model.AbstractBean;
import org.baeta.model.JSON2ModelFactory;
import org.json.JSONObject;
import junit.framework.TestCase;

/**
 * Description
 *
 * @author <a href="mailto:rui.baeta@gmail.com">Rui Baeta</a>
 * @version 26-Sep-2012 23:40:48
 */
public class WeatherObservationTestCase extends TestCase
{
    private static final Log LOG = LogFactory.getLog(WeatherObservationTestCase.class);

    public void testWeatherObservation() throws Exception
    {
        WeatherObservationClient client = new WeatherObservationJSONClient();
        JSONObject jsonObject = (JSONObject) client.getWeatherObservation(42.145638, 36.96125, -6.182694, -9.495944);

        AbstractBean bean = JSON2ModelFactory.getInstance().createBean(jsonObject);
        LOG.debug(bean);

    }
}
